package com.weijie.relaxed;

import android.app.Application;

import com.android.volley.RequestQueue;
import com.android.volley.toolbox.Volley;
import com.easemob.chat.EMChat;

/** 
 * @author weijie 
 * @version 创建时间：2015年3月18日 下午2:27:05 
 */
public class App extends Application {

	private RequestQueue requestQueue;

	@Override
	public void onCreate() {
		super.onCreate();
		requestQueue = Volley.newRequestQueue(this,new HttpsStack(this));
		EMChat.getInstance().init(this);
		EMChat.getInstance().setDebugMode(true);
	}
	public RequestQueue getRequestQueue(){
		return requestQueue;
	}
	public static final RequestQueue getRequestQueue(Application application){
		return getInstance(application).getRequestQueue();
	}
	public static final App getInstance(Application application){
		return (App) application;
	}
}
